//$(document).ready(function() {
  var medical = {
    init: function() {
      medical.getFontSize(document, window);
      medical.seatingPlan();
      $('.medical-container').height($(window).height());
      medical.swiperInit();
      medical.getLocate();

    },
    getFontSize: function(doc, win) {
      var docEl = doc.documentElement,
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        recalc = function() {
          var clientWidth = docEl.clientWidth;
          if(!clientWidth) return;
          docEl.style.fontSize = 54.6 * (clientWidth / 640) + 'px';
          if(clientWidth > 640) {
            docEl.style.fontSize = 32 + 'px';
          }
        };

      if(!doc.addEventListener) return;
      win.addEventListener(resizeEvt, recalc, false);
      doc.addEventListener('DOMContentLoaded', recalc, false);
    },
    seatingPlan: function() {
      var li = '';
      for(var i = 1; i <= 35; i++) {
        var index;
        if(i < 9) {
          index = "0" + i
        } else {
          index = i
        }
        li += "<li><div class='flex-box  flex-column scattergram-seatBox '><p class='scattergram-seat'></p><p class='scattergram-seat'></p><p class='scattergram-seat'></p></div><div class='scattergram-desk'>" + index + "</div><div class='flex-box flex-column scattergram-seatBox  '><p class='scattergram-seat'></p><p class='scattergram-seat'></p><p class='scattergram-seat'></p></div></li>"
      }

      $('.ulSeatBox').html(li);
    },
    swiperInit: function() {
      var mySwiper = new Swiper('.swiper-container', {
        direction: 'vertical',
        height: $(window).height(),//你的slide高度
      })

    },
    getLocate:function(){
    	
    	$(".scattergram-seat:eq("+1+")").addClass('locate');
    }

  }
  medical.init();
//})